﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dandan
{
    public class UserData
    {
        private static UserData userdata = null;//提供私有静态实例对象
        public static UserData GetData()
        {
            if (userdata == null)
            {
                userdata = new UserData();
            }
            return userdata;
        }

        public static void SetData(UserData Data)
        {
            userdata = Data;
        }

        public string status;
        public string code;
        public UserInfoClass data;
    }

    public class UserInfoClass
    {
        public int id;
        public String nickname;
        public String avatar;
        public String mobile;
        public String weixin;
        public String ali;
        public int online;
        public levelData level;
        public int is_new;
        public String expires_in;
        public int login;
        public String reg_ip;
        public String last_login_ip;
        public String created_at;
        public String updated_at;
        public String deleted_at;
        public String status;
        public ShopData[] shops;
        public ShopData[] belongs;
        public MouldsData[] moulds;
        public RolesClass[] roles;
    }

    public class RolesClass
    {
        public int id;
        public String name;
        public String title;
    }

    public class ShopData
    {
        public String id;
        public int owner_id;
        public String title;
        public String address;
        public levelData level;
        public String manager_id;
        public String province_id;
        public String city_id;
        public String area_id;
        public String status;
        public int count;
    }

    public class levelData
    {
        public int lv;
        public String name;
        public int score;
        public int next_level_up;
        public float cur_level_percent;
    }

    public class MouldsData
    {

        public int id;
        public String title;
        public String name;
        public GroupData group;
        public List<fieldsData> fields = new List<fieldsData>();
        public String description;
        public String created_at;
        public String updated_at;
        public String validate_rule;
        public LinksData links;
    }

    public class GroupData
    {
        public int id;
        public String title;
        public int pid;
        public String description;
        public int is_show;
        public String created_at;
        public String updated_at;
        public LinksData links;
    }
    

    public class LinksData
    {
        public String rel;
        public String href;
    }

}
